<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
    <meta charset="UTF-8">
    <title>巡检任务</title>
    <link href="./js/layui/css/layui.css" rel="stylesheet" type="text/css" media="screen">
    <link href="./js/lib/layui-formSelects/dist/formSelects-v4.css" rel="stylesheet" type="text/css" media="screen" />
    <link href="./css/common.css" rel="stylesheet" type="text/css" media="screen">
    <script src="./js/layui/layui.js" type="text/javascript"></script>
    <script src="./js/lib/weapp-qrcode.js"></script>
    <script src="../config.js" type="text/javascript"></script>
    <script src="./js/insTaskManage.js" type="text/javascript"></script>
</head>
<body class="white">
<div class=" site-inline site-fix" style="background-color:#ffffff;margin-top: 40px;" >
    <div class="site-content" >
        <form class="layui-form">
            <div class="layui-form">
                <label>巡检人员</label>
                <div class="layui-input-inline" >
                    <input id="staff" class="layui-input" placeholder="巡检人员">
                </div>
                <label>巡检线路</label>
                <div class="layui-inline">
                    <div class="layui-form">
                        <div class="layui-input-inline">
                            <select id="line_name" name="line_name" lay-filter="line_name" >
                            </select>
                        </div>
                    </div>
                </div>
                <label>巡检日期</label>
                <div class="layui-input-inline">
                    <input type="text"id="startDate" placeholder="巡检开始时间" name="startDate" class="layui-input" >
                </div>--
                <div class="layui-input-inline">
                    <input type="text"id="endDate" placeholder="巡检结束时间" name="endDate" class="layui-input" >
                </div>

                <div class="layui-input-inline">
                    <button class="layui-btn"  lay-submit="" lay-filter="search">查询</button>
                    <button class="layui-btn"  type="button" onclick="reload()">重置</button>
                    <button class="layui-btn" id="addTask" type="button">
                        <i class="layui-icon">&#xe608;</i> 新建任务
                    </button>
                </div>
            </div>
        </form>

        <div id="content">
            <table class="layui-table" id="insTasksTable"  lay-filter="insTasksTable"></table>
        </div>

    </div>
</div>
<script type="text/html" id="barCmdOperate">
    <div class="layui-btn-container">
        {{# if(d.STATUS=="0"){ }}
        <button class="layui-btn layui-btn-sm layui-btn-danger" lay-event="cancelTask">取消</button>
        {{# } }}
        <button class="layui-btn layui-btn-sm" lay-event="recordDetail">查看</button>
        {{# if(d.STATUS=="0" || d.STATUS=="5" || d.STATUS=="6"){ }}
        <button class="layui-btn layui-btn-sm layui-btn-danger" lay-event="recordDelete">删除</button>
        {{# } }}
    </div>
</script>
</body>
<div style="display: none" id="check_task_main">
    <div >
        <div class="layui-form">
            <form class="form-inline">
                <input type="text" id="taskId" name="taskId" style="display: none;">
                <div class="layui-form-item">
                    <label class="layui-form-label wd100">巡更线路:</label>
                    <div class="layui-input-inline" style="width: 300px">
                        <select id="lineName2" name="lineName" lay-filter="lineName2" >
                        </select>
                    </div>
                    <label class="layui-form-label wd100">巡更人员:</label>
                    <div class="layui-input-inline" style="width: 300px">
                        <select id="mulStaff2" name="mulStaff" >
                        </select>
                    </div>
                    <label class="layui-form-label wd100">巡更日期:</label>
                    <div class="layui-input-inline" style="width: 300px" >
                        <input type="text" id="inspectDate2" name="inspectDate" lay-verify="required" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label wd100">巡更开始时间:</label>
                    <div class="layui-input-inline" style="width: 300px">
                        <input type="text" id="inspectStartTime2" name="inspectStartTime" lay-verify="required" autocomplete="off" class="layui-input">
                    </div>
                    <label class="layui-form-label wd100">巡更时长:</label>
                    <div class="layui-input-inline" style="width: 300px">
                        <input type="text" id="inspecTime" disabled autocomplete="off" class="layui-input">
                    </div>
                    <label class="layui-form-label wd100">误差时长:</label>
                    <div class="layui-input-inline" style="width: 300px">
                        <input type="text" id="inspecErrTime" disabled autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item" >
                    <label class="layui-form-label wd100">任务状态:</label>
                    <label class="layui-form-label" style="margin-left: -45px" id="taskStatus">未开始</label>
                </div>
                <hr style="height:1px;border:none;border-top:1px solid #555555;" />
                <div class="layui-form-item">
                    <table class="layui-table" id="pointList" lay-filter="pointList"></table>
                </div>
                <div class="layui-form-item" >
                    <div class="layui-input-block">
                        <button class="layui-btn" type="button" id="confrim">确定</button>
                    </div>
                </div>
            </form>
        </div>
    </div>

</div>
<!--新建任务-->
<div class="layui-main " style="display: none " id="add_task_main">
    <div class="layui-main">
        <div class="layui-form">
            <form class="form-inline">
                <div class="layui-form-item">
                    <label class="layui-form-label wd100">巡更线路:</label>
                    <div class="layui-input-inline" style="width: 300px">
                        <select id="lineName" name="lineName" lay-filter="line_name" >
                        </select>
                    </div>
                    <label class="layui-form-label wd100">巡更人员:</label>
                    <div class="layui-input-inline" style="width: 300px">
                        <select lay-verify="required" id="mulStaff" name="mulStaff" xm-select="select_staff_id"  >
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label wd100">巡更有效期:</label>
                    <div class="layui-input-inline" style="width: 300px" >
                        <input type="text" id="inspectDate" name="inspectDate" lay-verify="required" autocomplete="off" class="layui-input">
                    </div>
                    <label class="layui-form-label wd100">巡更开始时间:</label>
                    <div class="layui-input-inline" style="width: 300px">
                        <input type="text" id="inspectStartTime" name="inspectStartTime" lay-verify="required" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item" style="margin-left: 66%">
                    <button type="button" class="layui-btn" id="reviewTask">预览每日任务</button>
                </div>
                <hr style="height:1px;border:none;border-top:1px solid #555555;" />
                <div class="layui-form-item">
                    <table class="layui-table" id="taskList" lay-filter="taskList"></table>
                </div>
                <div class="layui-form-item" >
                    <div class="layui-input-block">
                        <button class="layui-btn" type="button" id="cancelBtn">取消</button>
                        <button class="layui-btn" type="button" id="addBtn">保存任务</button>
                    </div>
                </div>
            </form>
        </div>
    </div>

</div>
</html>